home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / barcodes.zip / SAMPLE1.ZIP / BARCODES.H next >
C/C++ Source or Header  |  1994-11-07  |  4KB  |  121 lines

  1. //  C Header file for barcodes.dll
  2. //
  3. //
  4. // (c) Copyright 1994. All rights reserved.
  5. // HEX TECHNOLOGY, NEW ZEALAND,
  6. // FAX:  (64) (3) 3772255   
  7. // Last Modified: 5 Nov 94
  8. //
  9. //
  10. // BARCODE STYLES
  11. //                                                    
  12. // Use for iStyle parameter
  13. // 
  14. #define BARCODE_2of5                1  
  15. #define BARCODE_2of5_Interleaved    2
  16. #define BARCODE_3of9                3
  17. #define BARCODE_Codabar                4
  18. #define BARCODE_Code39                5
  19. #define BARCODE_Code93                6
  20. #define BARCODE_Code128                7
  21. #define BARCODE_EAN128                9    
  22. #define BARCODE_EAN13                10   
  23. #define BARCODE_EAN8                11   
  24. #define BARCODE_MSI                    12
  25. #define BARCODE_ITF                    13  
  26. #define BARCODE_Code11                14  
  27. #define BARCODE_CodeB                15  
  28. #define BARCODE_Telepen                16
  29. #define BARCODE_UPC_A                17
  30. #define BARCODE_UPC_E                22 
  31. #define BARCODE_Code128_A            23
  32. #define BARCODE_Code128_B            24
  33. #define BARCODE_Code128_C            25
  34.   
  35.  
  36.  
  37. // FLAG VALUES
  38. // 
  39. // Use for iDisplayFlags parameter
  40. // Add together to make a single value
  41. #define FLAG_ShowData                 1
  42. #define FLAG_WBearerBar                2        
  43. #define FLAG_HBearerBar                4
  44. #define FLAG_CheckDigit                8
  45. #define FLAG_ShowSpacer                16
  46. #define FLAG_SwitchText                32    
  47.                             
  48.  
  49. // FONT FLAGS
  50. //
  51. // Use for iFontFlags parameter
  52. // Add together to make a single value
  53. #define FONT_BOLD 1
  54. #define FONT_ITALIC 2    
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif    
  59. HMETAFILE FAR PASCAL _export DrawBarcode(
  60.                                  HDC hdc,            // Used for information only
  61.                                   int iStyle,        // one of BARCODE_XX
  62.                                  LPSTR szData,      // Data string to encode
  63.                                  LPSTR szText,      // Optional text to display
  64.                                  int iDisplayFlags, // Combination of FLAG_ values 
  65.                                   int iRatio,        // 0 = default 1 = 1.75 2 = 2.00 .... 7 = 3.0
  66.                                   LPSTR sFontFace,    // Eg: Arial or OCR-A etc TT Fonts only
  67.                                  int iFontFlags,     // Combination of FONT_ values
  68.                                  int iFontAdjustment,  // -200 to 200 to adjust default font size
  69.                                  long clrFront,      // 32Bit color value for barcode bars and text
  70.                                  long clrBack,          // 32Bit color value for barcode background
  71.                                   int far *iEntireWidth,  // set by dll, holds entire width of barcode
  72.                                  int far *iEntireHeight, // set by dll, holds entire height of barcode
  73.                                  int far *iBarcodeWidth,  // set by dll, holds just the width of the barcode itself
  74.                                  int far *iBarcodeHeight  // set by dll, holds just the height of the barcode itself
  75.                                  );
  76.  
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80.  
  81. // NOTE !!!
  82. // The iEntireWidth/Height and iBarcodeWidth/Height parameters are set when the
  83. // call to DrawBarcode/CreatePlacableBarcode returns.  You use these values
  84. // to scale the barcode image (HMETAFILE) to the desired size on your device context (HDC).
  85. // See the sample C++ source code file name barvw.cpp for an example of this.
  86. // Or see the Microsoft Word 6.0 macro that is also included with this archive.
  87.  
  88.  
  89.  
  90. // CreatePlacableBarcode is the same as DrawBarcode.. but instead of
  91. // returning a handle to the barcode metafile (HMETAFILE) it saves
  92. // the barcode to .WMF file on disk.  This file is compatible with
  93. // normal WMF graphic filters.
  94.  
  95. #ifdef __cplusplus
  96. extern "C" {
  97. #endif    
  98. BOOL FAR PASCAL _export CreatePlaceableBarcode( 
  99.                                  LPSTR fileName,      // Name of the disk file to create. eg: soup.wmf
  100.                                  HDC hdc,            // Used for information only
  101.                                   int iStyle,        // one of BARCODE_XX
  102.                                  LPSTR szData,      // Data string to encode
  103.                                  LPSTR szText,      // Optional text to display
  104.                                  int iDisplayFlags, // Combination of FLAG_ values 
  105.                                   int iRatio,        // 0 = default 1 = 1.75 2 = 2.00 .... 7 = 3.0
  106.                                   LPSTR sFontFace,    // Eg: Arial or OCR-A etc TT Fonts only
  107.                                  int iFontFlags,     // Combination of FONT_ values
  108.                                  int iFontAdjustment,  // -200 to 200 to adjust default font size
  109.                                  long clrFront,      // 32Bit color value for barcode bars and text
  110.                                  long clrBack,          // 32Bit color value for barcode background
  111.                                   int far *iEntireWidth,  // set by dll, holds entire width of barcode
  112.                                  int far *iEntireHeight, // set by dll, holds entire height of barcode
  113.                                  int far *iBarcodeWidth,  // set by dll, holds just the width of the barcode itself
  114.                                  int far *iBarcodeHeight);  // set by dll, holds just the height of the barcode itself
  115.  
  116. #ifdef __cplusplus
  117. }
  118. #endif
  119.                 
  120.  
  121.